package com.ruoyi.note.domain;

import com.ruoyi.common.annotation.Excels;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;

/**
 * 章节管理对象 t_book_chapter
 * 
 * @author cl
 * @date 2021-04-15
 */
public class TBookChapter extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 重要级别 */
    @Excel(name = "重要级别")
    private Long level;

    /** 名称 */
    @Excel(name = "名称")
    private String chapterName;

    /** 页码 */
    @Excel(name = "页码")
    private Long page;

    /** 排序 */
    @Excel(name = "排序")
    private Long sort;

    /** 用户 */
    private Long userId;

    /** 笔记 */
    @Excel(name = "笔记")
    private Long bookId;

    /** 部门对象 */
    @Excels({
            @Excel(name = "笔记", targetAttr = "bookName", type = Excel.Type.EXPORT)
    })
    private TBook book;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setLevel(Long level) 
    {
        this.level = level;
    }

    public Long getLevel() 
    {
        return level;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public void setPage(Long page)
    {
        this.page = page;
    }

    public Long getPage() 
    {
        return page;
    }
    public void setSort(Long sort) 
    {
        this.sort = sort;
    }

    public Long getSort() 
    {
        return sort;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setBookId(Long bookId) 
    {
        this.bookId = bookId;
    }

    public Long getBookId() 
    {
        return bookId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createTime", getCreateTime())
            .append("level", getLevel())
            .append("chapterName", getChapterName())
            .append("page", getPage())
            .append("sort", getSort())
            .append("userId", getUserId())
            .append("parentId", getParentId())
            .append("bookId", getBookId())
            .toString();
    }

    public TBook getBook() {
        return book;
    }

    public void setBook(TBook book) {
        this.book = book;
    }
}
